sampleSizeOneMeanDialog <- function(){
	initializeDialog(title=gettext("Sample Size Calculation One Normal Mean", domain="R-RcmdrPlugin.TeachingExtras"))
	onOK <- function(){
		mean <- tclvalue(meanVariable)
		sd <- tclvalue(sdVariable)
		sig <- tclvalue(sigVariable)
		error <- tclvalue(errorVariable)
		errortype <- as.character(tclvalue(errortypeVariable))
		closeDialog()
		doItAndPrint(paste("sampleSizeOneMean(mean=", mean, ", sd=", sd, ", sig.level=", sig, ", error=", error, ", error.type='", errortype, "')", sep=""))
		tkdestroy(top)
		tkfocus(CommanderWindow())
	}
	OKCancelHelp(helpSubject="sampleSizeOneMean")
	meanFrame <- tkframe(top)
	meanVariable <- tclVar("")
	meanField <- ttkentry(meanFrame, width="8", textvariable=meanVariable)
	sdFrame <- tkframe(top)
	sdVariable <- tclVar("1.0")
	sdField <- ttkentry(sdFrame, width="8", textvariable=sdVariable)
	sigFrame <- tkframe(top)
	sigVariable <- tclVar(".05")
	sigField <- ttkentry(sigFrame, width="6", textvariable=sigVariable)
	errorFrame <- tkframe(top)
	errorVariable <- tclVar("0.1")
	errorField <- ttkentry(errorFrame, width="6", textvariable=errorVariable)
	radioButtons(name="errortype", buttons=c("absolute", "relative"), values=c("absolute", "relative"),
			labels=gettext(c("Absolute", "Relative"), domain="R-RcmdrPlugin.TeachingExtras"), title=gettext("Error type", domain="R-RcmdrPlugin.TeachingExtras"))
	tkgrid(labelRcmdr(meanFrame, text=gettext("Mean: ", domain="R-RcmdrPlugin.TeachingExtras")), meanField, sticky="w")
	tkgrid(meanFrame, sticky="w")
	tkgrid(labelRcmdr(sdFrame, text=gettext("St. Desviation: ", domain="R-RcmdrPlugin.TeachingExtras")), sdField, sticky="w")
	tkgrid(sdFrame, sticky="w")
	tkgrid(labelRcmdr(sigFrame, text=gettext("Sig. Level: ", domain="R-RcmdrPlugin.TeachingExtras")), sigField, sticky="w")
	tkgrid(sigFrame, sticky="w")
	tkgrid(labelRcmdr(errorFrame, text=gettext("Error: ", domain="R-RcmdrPlugin.TeachingExtras")), errorField, sticky="w")
	tkgrid(errorFrame, sticky="w")
	tkgrid(errortypeFrame,sticky="w")
	tkgrid(buttonsFrame, sticky="w")
	dialogSuffix(rows=5, columns = 1)
}
